package com.cigs.wcs00a.taskPool;

import org.junit.Test;

import java.io.IOException;
import java.net.InetAddress;

/**
 * @Desc: ""
 * @Author: caixiang
 * @DATE: 2023-10-19 16:48
 */
public class PingMain {


    @Test
    public void test02() {
        try {
            InetAddress host = InetAddress.getByName("192.168.0.233");
            //3000 为超时时间
            boolean reachable = host.isReachable(3000);
            System.out.println(reachable);
        } catch (IOException e) {

        }
    }
}
